<script type="text/javascript">
$(function () {
	Highcharts.setOptions({{option|safe}});
    $('#highcharts_container').highcharts({
        global:{
            useUTC:false
        },
        credits:{
            enabled:false
        },
        chart: {
            type: '{{type}}',
        },
        title: {
            text: '　',
        },
        xAxis: {
            type: 'datetime',
            maxPadding : 0.05,
            minPadding : 0.05,
            tickPixelInterval : 150,
            //tickWidth:5,//刻度的宽度
            //lineColor : '#990000',//自定义刻度颜色
            //lineWidth :3,//自定义x轴宽度
            gridLineWidth :1,//默认是0，即在图上没有纵轴间隔线
            //自定义x刻度上显示的时间格式，根据间隔大小，以下面预设的小时/分钟/日的格式来显示
            labels: {
                formatter: function() {
                    return Highcharts.dateFormat('%m-%d %H:%M', this.value);
                }
            },
            title: {
                text: '{{title}}'
            }
        },
        yAxis: {
            min: 0,
            title: {
                text: ''
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y}</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            line: {
                gapSize: 10
            }
        },
        chart: {
            zoomType: 'x',
        },
        series: [
            {% for item in series %}
            {
                name: '{{item.name}}',
                data: [{% for k, v in item.data %}[{{k}},{{v}}],{% endfor %}],
            },
            {% endfor %}
		]
    });
});
</script>
<div id="highcharts_container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
